package top.goldenyear.porpoise.framework.security.config;

import top.goldenyear.porpoise.framework.security.core.service.BcryptPasswordEncoder;
import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

/**
 * @author airhead
 */
@Configuration
@Slf4j
public class SecurityConfig {
  @Bean
  public BcryptPasswordEncoder bcryptEncoder(@Inject SecurityProps securityProps) {
    return new BcryptPasswordEncoder(securityProps.getPasswordEncoderLength());
  }
}
